package com.killif;

import java.util.HashMap;
import java.util.Map;

/**
 * the type of advance
 * 勋章服务工产类
 * <p>
 * .
 *
 * @author 王志强
 * @date 2022-11-08
 */
public class MedalServiceFactory {
    private static final Map<String, IMedalService> MEDAL_SERVICE_MAP = new HashMap<>();

    static {
        MEDAL_SERVICE_MAP.put(IMedalName.GUARD, new GuardMedalServiceImpl());
        MEDAL_SERVICE_MAP.put(IMedalName.VIP, new VipMedalServiceImpl());
        MEDAL_SERVICE_MAP.put(IMedalName.GUEST, new GuestMedalServiceImpl());
    }

    public static IMedalService getMedalService(String medalType) {
        return MEDAL_SERVICE_MAP.get(medalType);
    }
}
